﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="Nivdal.Register" Culture="auto:en-US"
    UICulture="auto" StylesheetTheme="SkinFile" CodeBehind="Register.aspx.cs" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html>

<html id="Html1" xmlns="http://www.w3.org/1999/xhtml" runat="server" dir="<%$ Resources:Resource, _TextDirection  %>">
<head id="Head1" runat="server">
    
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta http-equiv="pragma" content="no-cache" />
    <meta name="keywords" content="Online Football Manager Game"/>
    <meta name="description" content="Nivdal.com is a free online football manager game, where you manage your own football team.  Nivdal is fast growing community, where you can find many interesting people. All this is free! You are welcome to try!"/>
    <title></title>
    <link rel="shortcut icon" href="~/Images/favicon.ico" />
    <link rel="icon" type="image/gif" href="~/Images/favicon.ico" />
    <asp:Literal ID="NoamStylesGlobalLiteral" runat="server"></asp:Literal>
    <asp:Literal ID="NoamStylesDefaultLiteral" runat="server" ></asp:Literal>
    <asp:Literal ID="StylesheetNewLiteral" runat="server"></asp:Literal>
    <asp:Literal ID="DirStylesheetLiteral" runat="server"></asp:Literal>
    <asp:Literal ID="RegisterCssLiteral" runat="server"></asp:Literal>
    

    <script src="JS/jquery-1.5.js" type="text/javascript"></script>   

    <script language="javascript" type="text/javascript">

        function foo() {
            rsw_autoFocusAfterAJAX = false;
            equalheights();            
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(doequalheights);
        }

        function doequalheights(sender, args) {
            equalheights();
        }

        function equalheights() {
            var fbheight = 360;
            var margins = 27;
            var loginheight = $("#login_area").height();
            var registerheight = $("#register_area").height();
            var totalheight = loginheight + fbheight + margins;

            $("facebook_area").height(fbheight);

            if (totalheight > registerheight) {
                $("#register_area").height(totalheight);
            }
            


        }
            
    </script>

</head>
<body onload="foo()">
    <form id="form1" runat="server" style="margin:0 0 0 0;">
    <div>
        <script type="text/javascript">
            // facebook reloader during update panel refresh:
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandlerBerliner);
            function EndRequestHandlerBerliner(sender, args) {
                if (args.get_error() == undefined) {
                    FB.XFBML.parse();
                }
            }
        </script>
        <asp:HiddenField runat="server"  ID="RegisterIdHiddenField" />
        <asp:HiddenField runat="server" Value="<%$ Resources:Resource, General_Available %>" ID="Available" />
        <asp:HiddenField runat="server" Value="<%$ Resources:Resource, General_Unavailable %>" ID="Unavailable" />
        <asp:HiddenField runat="server" Value="<%$ Resources:Resource, General_Checking %>" ID="Checking" />

    <!-- Google Code for &#1502;&#1506;&#1489;&#1512; &#1500;&#1491;&#1507; &#1492;&#1512;&#1513;&#1502;&#1492; Conversion Page -->


    <script language="javascript" type="text/javascript">

        function pageLoad() {
            _divStatus = $get('<%= CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("divStatus").ClientID %>');
            _EmaildivStatus = $get('<%= CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("EmaildivStatus").ClientID %>');
            
            _TeamNameDivStatus = $get('<%= CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("TeamNameDivStatus").ClientID %>');
            _StepNextButton = $get('<%= CreateUserWizard1.CreateUserStep.CustomNavigationTemplateContainer.FindControl("StepNextButton").ClientID %>');
            _Available = $get('<%= FindControl("Available").ClientID %>');
            _Unavailable = $get('<%= FindControl("Unavailable").ClientID %>');
            _Checking = $get('<%= FindControl("Checking").ClientID %>');
            //alert("_Available" + _Available.value);

        }

        var usernameCheckerTimer;
       
        ///var spanAvailability = document.getElementById("CreateUserWizard1_CreateUserStepContainer_IspanAvailability");
        function usernameChecker(username) {
            clearTimeout(usernameCheckerTimer);
            if (username.length == 0)
                _divStatus.innerHTML = "";
            else {
                _divStatus.innerHTML = "<span style='color: #ccc;'>" + _Checking.value + "</span>";
                usernameCheckerTimer = setTimeout("checkUsernameUsage('" + username + "');", 750);
            }
        }

        var emailCheckerTimer;

        function emailChecker(email) {
            clearTimeout(emailCheckerTimer);
            if (email.length == 0)
                _EmaildivStatus.innerHTML = "";
            else {
                _EmaildivStatus.innerHTML = "<span style='color: #ccc;'>" + _Checking.value + "</span>";
                emailCheckerTimer = setTimeout("checkEmailUsage('" + email + "');", 750);
            }
        }

        var PublicNameCheckerTimer;

//        function PublicNameChecker(PublicName) {
//            clearTimeout(PublicNameCheckerTimer);
//            if (PublicName.length == 0)
//                _PublicNameDivStatus.innerHTML = "";
//            else {
//                _PublicNameDivStatus.innerHTML = "<span style='color: #ccc;'>" + _Checking.value + "</span>";
//                PublicNameCheckerTimer = setTimeout("checkPublicNameUsage('" + PublicName + "');", 750);
//            }
//        }

        var TeamNameCheckerTimer;

        function TeamNameChecker(TeamName) {
            clearTimeout(TeamNameCheckerTimer);
            if (TeamName.length == 0)
                _TeamNameDivStatus.innerHTML = "";
            else {
                _TeamNameDivStatus.innerHTML = "<span style='color: #ccc;'>" + _Checking.value + "</span>";
                TeamNameCheckerTimer = setTimeout("checkTeamNameUsage('" + TeamName + "');", 750);
            }
        }



        function checkUsernameUsage(username) {
            // initiate the ajax pagemethod call
            // upon completion, the OnSucceded callback will be executed
            PageMethods.IsUserAvailable(username, OnSucceeded);
            //alert("UserName is:" + username);
        }


        function checkEmailUsage(email) {
            // initiate the ajax pagemethod call
            // upon completion, the OnSucceded callback will be executed
            PageMethods.CheckEmail(email, OnEmailSucceeded);
            //alert("UserName is:" + username);
        }

        function checkPublicNameUsage(PublicName) {
            // initiate the ajax pagemethod call
            // upon completion, the OnSucceded callback will be executed
            PageMethods.CheckPublicName(PublicName, OnPublicNameSucceeded);
            //alert("UserName is:" + username);
        }


        function checkTeamNameUsage(TeamName) {
            // initiate the ajax pagemethod call
            // upon completion, the OnSucceded callback will be executed
            PageMethods.CheckTeamName(TeamName, OnTeamNameSucceeded);
            //alert("UserName is:" + username);
        }

        var isUsrAvail = true
        var isMailAvail = true;
        var isPublicNameAvail = true;
        var isTeamName = true;

        // Callback function invoked on successful completion of the page method.
        function OnSucceeded(result, userContext, methodName) {
            if (methodName == "IsUserAvailable") {
                if (result == true) {
                    isUsrAvail = true;
                    _divStatus.innerHTML = "<span style='color: DarkGreen;'>" + _Available.value + "</span>";
                }
                if (isUsrAvail == true && isMailAvail == true && isPublicNameAvail == true && isTeamName == true) {
                    _StepNextButton.disabled = false;
                }
                if (result == false) {
                    _divStatus.innerHTML = "<span style='color: Red;'>" + _Unavailable.value + "</span>";
                    _StepNextButton.disabled = true;
                    isUsrAvail = false;
                }
            }
        }

        // Callback function invoked on successful completion of the page method.
        function OnEmailSucceeded(result, userContext, methodName) {
            if (methodName == "CheckEmail") {
                if (result == true) {
                    isMailAvail = true;
                    _EmaildivStatus.innerHTML = "<span style='color: DarkGreen;'>" + _Available.value + "</span>";
                }
                if (isUsrAvail == true && isMailAvail == true && isPublicNameAvail == true && isTeamName == true) { 
                    _StepNextButton.disabled = false;
                }
                if (result == false) {
                    _EmaildivStatus.innerHTML = "<span style='color: Red;'>" + _Unavailable.value + "</span>";
                    _StepNextButton.disabled = true;
                    isMailAvail = false; 
                }
            }
        }

        // Callback function invoked on successful completion of the page method.
//        function OnPublicNameSucceeded(result, userContext, methodName) {
//            if (methodName == "CheckPublicName") {
//                if (result == true) {
//                    isPublicNameAvail = true;
//                    _PublicNameDivStatus.innerHTML = "<span style='color: DarkGreen;'>" + _Available.value + "</span>";
//                }
//                if (isUsrAvail == true && isMailAvail == true && isPublicNameAvail == true && isTeamName == true) {
//                    _StepNextButton.disabled = false;
//                }
//                if (result == false) {
//                    _PublicNameDivStatus.innerHTML = "<span style='color: Red;'>" + _Unavailable.value + "</span>";
//                    _StepNextButton.disabled = true;
//                     isPublicNameAvail = false;
//                }
//            }
//        }

        // Callback function invoked on successful completion of the page method.
        function OnTeamNameSucceeded(result, userContext, methodName) {
            if (methodName == "CheckTeamName") {
                if (result == true) {
                    isTeamName = true;
                    _TeamNameDivStatus.innerHTML = "<span style='color: DarkGreen;'>" + _Available.value + "</span>";

                }
                if (isUsrAvail == true && isMailAvail == true && isPublicNameAvail == true && isTeamName == true) {
                    _StepNextButton.disabled = false;
                }
                if (result == false) {
                    _TeamNameDivStatus.innerHTML = "<span style='color: Red;'>" + _Unavailable.value + "</span>";
                    _StepNextButton.disabled = true;
                    isTeamName = false;

                }
            }
        }
</script>
    
    <asp:Panel ID="DirectionPanel" runat="server" Direction="LeftToRight">
        <cc1:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server" EnablePageMethods="true">
        </cc1:ToolkitScriptManager>
        <asp:HiddenField ID="CountryByIPHiddenField" runat="server" /> 
        <asp:HiddenField ID="IPAddressHiddenField" runat="server" />
        <div class="bg_layer1">
        <script type="text/javascript"  language="javascript">
            // no change of scroll position during update panel update
            var prm = Sys.WebForms.PageRequestManager.getInstance();

            prm.add_beginRequest(beginRequest);

            function beginRequest() {
                prm._scrollPosition = null;
            }
        </script>
        <div  class="bg_layer2_pic">
            <div class="auto_margin site_width" style="border: 1px solid transparent;">
            <div id="default_outsidediv" class="floater">
                <table style="width:100%;">
                <tr>
                <td class="login_width" style="vertical-align:top;">
                    <asp:LoginView ID="LoginView1" runat="server">
                    <AnonymousTemplate>
                        <asp:Panel ID="LoginPanel" runat="server">
                            <asp:Login ID="Login1" runat="server" DestinationPageUrl="~/RegistrationMessage.aspx"
                                FailureText="<%$ Resources:Resource, Default_Login1Text %>">
                                <LayoutTemplate>
                                    <div class="basic_element login_width" id="login_area">
                                     <div class="tbl"><div class="tblr"><div class="red_title_default">
                                       <asp:Label ID="MembersLoginLabel" runat="server" Text="<%$ Resources:Resource, Default_MembersLoginText %>" CssClass="white_title_default"></asp:Label>
                                    </div></div></div> 
                                    <div class="padding5">
                                        <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName" CssClass="login_titles"
                                         Text="<%$ Resources:Resource, Global_Username %>"></asp:Label>
                                        <br />
                                        <asp:TextBox ID="UserName" runat="server" Font-Size="18px" Height="20px" Width="250px" CssClass="rounded_corners"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                                              ErrorMessage="*"  ValidationGroup="ctl00$Login1"></asp:RequiredFieldValidator>
                                        <br /><br />
                                        <asp:Label ID="PasswordLabel" runat="server" CssClass="login_titles"
                                            AssociatedControlID="Password" Text="<%$ Resources:Resource, Default_PasswordText %>"></asp:Label>
                                        <br />
                                        <asp:TextBox ID="Password" runat="server" Font-Size="18px" Height="20px" TextMode="Password" Width="250px" CssClass="rounded_corners"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                            ErrorMessage="*" ValidationGroup="ctl00$Login1"></asp:RequiredFieldValidator>
                                        <br />
                                        <asp:Literal ID="FailureText" runat="server" Text=""></asp:Literal>
                                        <br />
                                        <asp:HyperLink ID="ForgotPasswordHyperLink" runat="server" CssClass="default_text_font red_inline_text" NavigateUrl="~/RecoverPassword.aspx" 
                                          Text="<%$ Resources:Resource, Default_ForgotPasswordHyperLinkText %>"></asp:HyperLink>
                                        &nbsp;&nbsp;
                                        <asp:HyperLink ID="RegisterHyperLink" runat="server" CssClass="default_text_font red_inline_text"  NavigateUrl="~/Register.aspx" 
                                        Text="<%$ Resources:Resource, Default_RegisterHyperLinkText %>"></asp:HyperLink>                                                
                                        &nbsp;&nbsp;
                                        <asp:Button ID="LoginButton" runat="server" ValidationGroup="ctl00$Login1" CssClass="bigredbutton" 
                                        Text="<%$ Resources:Resource, Default_SignInText %>" CommandName="Login" />
                                    </div>
                                    </div>
                                </LayoutTemplate>
                            </asp:Login>
                        </asp:Panel>
                    </AnonymousTemplate>
                    </asp:LoginView>
                    
                    <asp:Panel ID="FacebookPanel" runat="server">
                    <div class="basic_element floater login_width" id="facebook_area">
                    <div class="tbl"><div class="tblr"><div class="red_title_default">
                       <asp:Label ID="FacebookTitleLabel" runat="server" Text="<%$ Resources:Resource, Default_FacebookTitle %>" CssClass="white_title_default"></asp:Label>
                    </div></div></div>
                    <div class="padding5">
                        <script  type ="text/javascript" src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
                        <fb:like-box href="http://he-il.facebook.com/pages/nivdal/134220936599342" width="300" show_border="false"
                            height="300" show_faces="true" stream="false" header="false" onerror="this.src='Images/facebookbg.jpg';"></fb:like-box>                    
                    </div>               
                    </div>
                    </asp:Panel>
                </td>
                <td class="default_width align" style="vertical-align:top;">
                <asp:Panel ID="RegisterWizardPanel" runat="server">
                <div class="default_padding">
                <div class="basic_element fullheight" id="register_area">
                <div class="tbl"><div class="tblr"><div class="red_title_default">
                    <asp:Label ID="RegisterSignupLabel" runat="server" Text="<%$ Resources:Resource, Register_SignUpForYourAccountString%>" CssClass="white_title_default"></asp:Label>
                </div></div></div>
                <div class="padding5">
                    <asp:HyperLink ID="DefaultLink" runat="server" ImageUrl="~/Images/logobeta3.png" NavigateUrl="~/Default.aspx"  class="antifloater logo_inside"></asp:HyperLink>
                    
                    <asp:Label ID="TitleLabel" runat="server" Text="<%$ Resources:Resource, Register_PleaseFillIn %>" CssClass="default_text_font red_inline_text"></asp:Label>
                    <br /><br />
                    <asp:Label ID="MustTitleLabel" runat="server" Text="<%$ Resources:Resource, Register_RequiredField %>" CssClass="default_text_font"></asp:Label>
                    <div class="clearBoth"></div>
                    <asp:CreateUserWizard ID="CreateUserWizard1" runat="server"
                    OnCreatedUser="CreateUserWizard1_CreatedUser" 
                    ContinueDestinationPageUrl="~/RegistrationMessage.aspx">
                    <FinishNavigationTemplate>
                        <asp:Button ID="FinishPreviousButton" runat="server" CssClass="bigredbutton antifloater" CausesValidation="False" CommandName="MovePrevious"
                          Text="<%$ Resources:Resource, Global_Previous %>"  />
                        <asp:Button ID="FinishButton" runat="server" CssClass="bigredbutton antifloater" CommandName="MoveComplete" Text="<%$ Resources:Resource, Register_FinishButton %>" />
                    </FinishNavigationTemplate>
                    <ContinueButtonStyle CssClass="bigredbutton antifloater" />
                    <NavigationButtonStyle CssClass="bigredbutton antifloater" />
                    
                    <CreateUserButtonStyle CssClass="bigredbutton antifloater" />
                    <StepNavigationTemplate>
                        <asp:Button ID="StepPreviousButton" runat="server" CssClass="bigredbutton antifloater"  CausesValidation="False" CommandName="MovePrevious"
                           Text="<%$ Resources:Resource, Global_Previous %>" />
                        <asp:Button ID="StepNextButton" runat="server" CssClass="bigredbutton antifloater" 
                            CommandName="<%$ Resources:Resource, Register_StepNextButton %>" Text="<%$ Resources:Resource, Global_Next%>" />
                    </StepNavigationTemplate>
                    <TitleTextStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <StepStyle BorderWidth="0px" />
                    <WizardSteps>
                        <%--<asp:WizardStep ID="CreateUserWizardStep0" runat="server">
                    <%--<cc1:captchacontrol id="ccJoin" runat="server" captchabackgroundnoise="Low" captchaheight="60"
                        captchalength="6" captchalinenoise="None" captchamaxtimeout="240" captchamintimeout="6"
                        captchawidth="200" />
                </asp:WizardStep>--%>
                        <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
                            <ContentTemplate>
                                <table cellpadding="2" cellspacing="0" style="width: 100%;">
                                    <tr >
                                        <td style="width: 30%;height:40px;">
                                            <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName" Text="<%$ Resources:Resource, Register_UserNameLabel%>" CssClass="default_text_font"></asp:Label>
                                        </td>
                                        <td style="width: 45%;height:40px;">
                                            <asp:TextBox ID="UserName" runat="server" onkeyup="usernameChecker(this.value);"  Width="98%"
                                            Font-Size="18px" Height="20px" CssClass="rounded_corners"></asp:TextBox>
                                        </td>
                                        <td style="width:25%;height:40px;">
                                            <div id="divStatus" runat="server"></div>
                                            <%--<cc1:TextBoxWatermarkExtender ID="UserNameExtender" TargetControlID="UserName" runat="server" WatermarkCssClass="watermark"
                                                WatermarkText="<%$ Resources:Resource, Register_OnlyForLoginMessageLabel %>">
                                            </cc1:TextBoxWatermarkExtender>--%>
                                            <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                                                ErrorMessage="<%$ Resources:Resource, Global_UserNameIsRequired %>" Display="None"
                                                ValidationGroup="CreateUserWizard1"></asp:RequiredFieldValidator>
                                            <cc1:ValidatorCalloutExtender ID="UserNameRequiredExt" runat="server" WarningIconImageUrl="Images/001_111.png"
                                                CloseImageUrl="Images/001_051.png" CssClass="customCalloutStyle" TargetControlID="UserNameRequired">
                                            </cc1:ValidatorCalloutExtender>
                                        </td>
                                    </tr>
                                    <tr >
                                        <td style="height:40px;">
                                            <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password"  CssClass="default_text_font"
                                                Text="<%$ Resources:Resource, Register_Password %>"></asp:Label>
                                        </td>
                                        <td style="height:40px;">
                                            <asp:TextBox ID="Password" runat="server" TextMode="Password" Width="98%" MaxLength="20"
                                            Font-Size="18px" Height="20px" CssClass="rounded_corners"></asp:TextBox>
                                            
                                        </td>
                                        <td style="height:40px;">
                                            <asp:Panel ID="PasswordDirPanel" runat="server" Direction="LeftToRight">
                                            <cc1:PasswordStrength ID="Passwordstrength1" runat="server" PrefixText="<%$ Resources:Resource, Register_Strength %>"
                                                TextStrengthDescriptionStyles="VeryPoor; Weak; Average; Strong; Excellent" DisplayPosition="AboveLeft"
                                                StrengthStyles="VeryPoor; Weak; Average; Strong; Excellent"
                                                MinimumNumericCharacters="1" MinimumSymbolCharacters="1" PreferredPasswordLength="8"
                                                TextStrengthDescriptions="<%$ Resources:Resource, Register_PasswordStrength %>"
                                                TargetControlID="Password">
                                            </cc1:PasswordStrength>
                                            <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                                Display="None" ErrorMessage="<%$ Resources:Resource, Register_PasswordRequiredErrorMessage %>"
                                                ValidationGroup="CreateUserWizard1"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="valPassword" runat="server" CssClass="reg_text red_inline_text" 
                                                ControlToValidate="Password" ErrorMessage="<%$ Resources:Resource, Register_Min_Pass_Length %>"
                                                    ValidationExpression=".{5}.*"  ValidationGroup="CreateUserWizard1"/>
                                            <cc1:ValidatorCalloutExtender ID="PasswordRequiredExtender" runat="server" WarningIconImageUrl="Images/001_111.png"
                                                CloseImageUrl="Images/001_051.png" CssClass="customCalloutStyle" TargetControlID="PasswordRequired">
                                            </cc1:ValidatorCalloutExtender>
                                            
                                            </asp:Panel>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="height:40px;">
                                            <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword"
                                                Text="<%$ Resources:Resource, Register_ConfirmPasswordLabel %>"  CssClass="default_text_font"></asp:Label>
                                        </td>
                                        <td style="height:40px;">
                                            <asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password" Width="98%"
                                                MaxLength="20" Font-Size="18px" Height="20px" CssClass="rounded_corners"></asp:TextBox>
                                        </td>
                                        <td style="height:40px;">
                                            <asp:Panel ID="ConfirmPasswordDirectionPanel" runat="server" Direction="LeftToRight">
                                            <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="ConfirmPassword"
                                                Display="None" ErrorMessage="<%$ Resources:Resource, Global_ConfirmPasswordIsRequired %>"
                                                ToolTip="<%$ Resources:Resource, Global_ConfirmPasswordIsRequired %>" ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                            <cc1:ValidatorCalloutExtender ID="ValidatConfirmPasswordRequiredExtender" runat="server"
                                                WarningIconImageUrl="Images/001_111.png" CloseImageUrl="Images/001_051.png" CssClass="customCalloutStyle"
                                                TargetControlID="ConfirmPasswordRequired">
                                            </cc1:ValidatorCalloutExtender>
                                            <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password"
                                                ControlToValidate="ConfirmPassword" Display="None" ErrorMessage="<%$ Resources:Resource, Register_PasswordCompareErrorMessage %>"
                                                ValidationGroup="CreateUserWizard1"></asp:CompareValidator>
                                            <cc1:ValidatorCalloutExtender ID="PasswordComparetExtender" runat="server" TargetControlID="PasswordCompare">
                                            </cc1:ValidatorCalloutExtender>
                                            </asp:Panel>
                                        </td>
                                    </tr>
                                    <%--<tr style="height:40px;">
                                        <td>
                                            <asp:Label ID="PublicNameLabel" runat="server"  AssociatedControlID="PublicName" Text="<%$ Resources:Resource, Register_PublicNameLabel %>"
                                               CssClass="default_text_font">
                                            </asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="PublicName" onkeyup="PublicNameChecker(this.value);" runat="server" Width="98%"
                                            Font-Size="18px" Height="20px" CssClass="rounded_corners"></asp:TextBox>
                                            </td>
                                        <td>
                                            <div id="PublicNameDivStatus" runat="server"></div>
                                            <cc1:TextBoxWatermarkExtender runat="server" ID="PublicNameExtender" TargetControlID="PublicName"
                                                WatermarkText="<%$ Resources:Resource, Register_PublicNameExplantionLabel %>" WatermarkCssClass="watermark">
                                            </cc1:TextBoxWatermarkExtender>
                                            <asp:RequiredFieldValidator ID="PublicNameRequired" runat="server" ControlToValidate="PublicName"
                                                Display="None" ErrorMessage="<%$ Resources:Resource, Register_PublicNameRequiredErrorMessage %>"
                                                ToolTip="<%$ Resources:Resource, Register_PublicNameRequired %>" ValidationGroup="CreateUserWizard1"></asp:RequiredFieldValidator>
                                            <cc1:ValidatorCalloutExtender ID="PublicNameRequiredExtender" runat="server" WarningIconImageUrl="Images/001_111.png"
                                                CloseImageUrl="Images/001_051.png" CssClass="customCalloutStyle" TargetControlID="PublicNameRequired">
                                            </cc1:ValidatorCalloutExtender>
                                        </td>
                                    </tr>--%>
                                    <tr>
                                        <td style="height:40px;">
                                            <asp:Label ID="TeamNameLabel" runat="server" Text="<%$ Resources:Resource, Register_TeamNameLabel %>"
                                                AssociatedControlID="TeamName" CssClass="default_text_font"></asp:Label>
                                        </td>
                                        <td style="height:40px;">
                                            <asp:TextBox ID="TeamName" onkeyup="TeamNameChecker(this.value);" runat="server"  MaxLength="256" Width="98%"
                                            Font-Size="18px" Height="20px" CssClass="rounded_corners"></asp:TextBox>
                                        </td>
                                        <td style="height:40px;">
                                            <div id="TeamNameDivStatus"  runat="server"></div>
                                            <asp:RequiredFieldValidator ID="TeamNameRequired" runat="server" ControlToValidate="TeamName"
                                                Display="None" ErrorMessage="<%$ Resources:Resource, Register_TeamNameRequiredErrorMessage %>"
                                                ToolTip="<%$ Resources:Resource, Register_TeamNameRequired %>" ValidationGroup="CreateUserWizard1"></asp:RequiredFieldValidator>
                                            <cc1:ValidatorCalloutExtender ID="TeamNameRequiredExtender" runat="server" WarningIconImageUrl="Images/001_111.png"
                                                CloseImageUrl="Images/001_051.png" CssClass="customCalloutStyle" TargetControlID="TeamNameRequired">
                                            </cc1:ValidatorCalloutExtender>
                                        </td>
                                    </tr>
                                   <%-- <tr>
                                        <td>
                                            <asp:Label ID="QuestionLabel" runat="server" AssociatedControlID="Question" Text="<%$ Resources:Resource, Register_QuestionLabel %>"
                                               CssClass="default_text_font"> 
                                            </asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="Question" runat="server" Width="98%" Font-Size="18px" Height="20px" CssClass="rounded_corners"></asp:TextBox>
                                        </td>
                                        <td>
                                            <asp:RequiredFieldValidator ID="QuestionRequired" runat="server" ControlToValidate="Question"
                                                Display="None" ErrorMessage="<%$ Resources:Resource, Register_QuestionRequiredErrorMessage %>"
                                                ToolTip="<%$ Resources:Resource, Register_QuestionRequired %>" ValidationGroup="CreateUserWizard1"></asp:RequiredFieldValidator>
                                            <cc1:ValidatorCalloutExtender ID="QuestionRequiredExtender" runat="server" WarningIconImageUrl="Images/001_111.png"
                                                CloseImageUrl="Images/001_051.png" CssClass="customCalloutStyle" TargetControlID="QuestionRequired">
                                            </cc1:ValidatorCalloutExtender>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="AnswerLabel" runat="server" AssociatedControlID="Answer" Text="<%$ Resources:Resource, Register_AnswerLabel %>"
                                              CssClass="default_text_font"> </asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="Answer" runat="server" Width="98%" Font-Size="18px" Height="20px" CssClass="rounded_corners"></asp:TextBox>
                                        </td>
                                        <td>
                                            <asp:RequiredFieldValidator ID="AnswerRequired" runat="server" ControlToValidate="Answer"
                                                Display="None" ErrorMessage="<%$ Resources:Resource, Register_AnswerRequiredErrorMessage %>"
                                                ToolTip="<%$ Resources:Resource, Register_AnswerRequired %>" ValidationGroup="CreateUserWizard1"></asp:RequiredFieldValidator>
                                            <cc1:ValidatorCalloutExtender ID="AnswerRequiredExtender" runat="server" WarningIconImageUrl="Images/001_111.png"
                                                CloseImageUrl="Images/001_051.png" CssClass="customCalloutStyle" TargetControlID="AnswerRequired">
                                            </cc1:ValidatorCalloutExtender>
                                        </td>
                                    </tr>--%>
                                    <tr>
                                        <td style="height:40px;">
                                            <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email"  CssClass="default_text_font"
                                                Text="<%$ Resources:Resource, Global_Email %>"></asp:Label>
                                            <asp:Label ID="StarAdditionLabel" runat="server" CssClass="default_text_font">: *</asp:Label>
                                        </td>
                                        <td style="height:40px;">
                                            <asp:TextBox ID="Email" runat="server"  onkeyup="emailChecker(this.value);"  Width="98%"
                                            Font-Size="18px" Height="20px" CssClass="rounded_corners"></asp:TextBox>
                                        </td>
                                        <td style="height:40px;">
                                            <div id="EmaildivStatus" runat="server"></div>
                                            <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email"
                                                Display="None" ErrorMessage="<%$ Resources:Resource, Global_EmailRequired %>"
                                                ToolTip="<%$ Resources:Resource, Global_EmailRequired %>" ValidationGroup="CreateUserWizard1"></asp:RequiredFieldValidator>
                                            <cc1:ValidatorCalloutExtender ID="EmailRequiredExtender" runat="server" WarningIconImageUrl="Images/001_111.png"
                                                CloseImageUrl="Images/001_051.png" CssClass="customCalloutStyle" TargetControlID="EmailRequired">
                                            </cc1:ValidatorCalloutExtender>
                                            <asp:RegularExpressionValidator ID="EmailValidationExpressionValidator" runat="server"
                                                ControlToValidate="Email" Display="None" ErrorMessage="<%$ Resources:Resource, Global_NotLegalEmail %>"
                                                ToolTip="<%$ Resources:Resource, Global_NotLegalEmail %>" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                                ValidationGroup="CreateUserWizard1">
                                            </asp:RegularExpressionValidator>
                                            <cc1:ValidatorCalloutExtender ID="EmailValidationExpressionExtender" runat="server"
                                                WarningIconImageUrl="Images/001_111.png" CloseImageUrl="Images/001_051.png" CssClass="customCalloutStyle"
                                                TargetControlID="EmailValidationExpressionValidator">
                                            </cc1:ValidatorCalloutExtender>
                                        </td>
                                    </tr>
                                    <%--<tr>
                                        <td style="height:40px;">
                                            <asp:Label ID="FirstNameLabel" runat="server" AssociatedControlID="FirstName" Text="<%$ Resources:Resource, Register_FirstNameLabel %>"
                                               CssClass="login_titles"> </asp:Label>
                                        </td>
                                        <td style="height:40px;">
                                            <asp:TextBox ID="FirstName" runat="server" Width="98%" Font-Size="18px" Height="20px" CssClass="rounded_corners"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="height:40px;">
                                            <asp:Label ID="LastNameLabel" runat="server" AssociatedControlID="LastName" Text="<%$ Resources:Resource, Register_LastNameLabel %>"
                                              CssClass="login_titles"> </asp:Label>
                                        </td>
                                        <td style="height:40px;">
                                            <asp:TextBox ID="LastName" runat="server" Width="98%" Font-Size="18px" Height="20px" CssClass="rounded_corners"></asp:TextBox>
                                        </td>
                                    </tr>--%>
                                    <tr>
                                        <td style="height:40px;">
                                            <asp:Label ID="NationalityLabel" runat="server" AssociatedControlID="NationalityDropDownList"
                                                Text="<%$ Resources:Resource, Register_NationalityLabel %>" SkinID="InfoLabel"  CssClass="default_text_font"
                                                ToolTip="<%$ Resources:Resource, Register_NationalityLabelToolTip %>"></asp:Label>
                                        </td>
                                        <td style="height:40px;">
                                            <asp:DropDownList ID="NationalityDropDownList" runat="server" DataSourceID="NationalitiesSqlDataSource"
                                                DataTextField="Name" DataValueField="Id" Width="100%" Font-Size="18px" CssClass="rounded_corners">
                                            </asp:DropDownList>
                                        </td>
                                        <td style="height:40px;">
                                                <asp:RequiredFieldValidator ID="NationalityRequiredFieldValidator" runat="server"
                                                ControlToValidate="NationalityDropDownList" Display="None" ErrorMessage="*" Height="16px"
                                                InitialValue="10" ValidationGroup="CreateUserWizard1" Style="margin-right: 0px"
                                                Width="16px"></asp:RequiredFieldValidator>
                                            <cc1:ValidatorCalloutExtender ID="NationalityRequiredExtender" WarningIconImageUrl="Images/001_111.png"
                                                CloseImageUrl="Images/001_051.png" CssClass="customCalloutStyle" runat="server"
                                                TargetControlID="NationalityRequiredFieldValidator">
                                            </cc1:ValidatorCalloutExtender>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="height:40px;">
                                            <asp:Label ID="PreferredLanguageLabel" runat="server" AssociatedControlID="LanguageDropDownList"
                                                Text="<%$ Resources:Resource, Register_PreferredLanguageLabel %>"  CssClass="default_text_font"> </asp:Label>
                                        </td>
                                        <td style="height:40px;">
                                            <asp:DropDownList ID="LanguageDropDownList" runat="server" DataTextField="Language_Name"
                                                DataValueField="Language_Code" DataSourceID="SqlDataSource2" Width="100%"
                                                Font-Size="18px" CssClass="rounded_corners">
                                            </asp:DropDownList>
                                        </td>
                                        <td style="height:40px;">
                                            <asp:RequiredFieldValidator ID="LanguageRequiredFieldValidator" runat="server" ControlToValidate="LanguageDropDownList"
                                                Display="None" ErrorMessage="*" Height="16px" InitialValue="1" ValidationGroup="CreateUserWizard1"
                                                Style="margin-right: 0px" Width="16px"></asp:RequiredFieldValidator>
                                            <cc1:ValidatorCalloutExtender ID="LanguageRequiredExtender" runat="server" WarningIconImageUrl="Images/001_111.png"
                                                CloseImageUrl="Images/001_051.png" CssClass="customCalloutStyle" TargetControlID="LanguageRequiredFieldValidator">
                                            </cc1:ValidatorCalloutExtender>
                                        </td>
                                    </tr>
                                </table>
                                <div class="floater login_width">
                                    <asp:CheckBox ID="chkTandCs" runat="server" />
                                    <asp:Label ID="TermsTitleLabel" runat="server" Text="<%$ Resources:Resource, Register_TermsTitleLabel %>" CssClass="reg_text"></asp:Label>
                                    <asp:HyperLink ID="HyperLink1"  runat="server" NavigateUrl="~/Terms.aspx" Target="_blank"
                                        Text="<%$ Resources:Resource, Global_TermOfUse %>" CssClass="reg_text red_inline_text"></asp:HyperLink>
                                    <asp:Label ID="AlsoLabel" runat="server" Text="<%$ Resources:Resource, Register_AlsoLabel %>" CssClass="reg_text"></asp:Label>
                                    <asp:HyperLink ID="PrivacyPolicyHyperlink" runat="server" Text="<%$ Resources:Resource, Global_PrivacyPolicy %>"
                                        NavigateUrl="~/Privacy.aspx" CssClass="reg_text red_inline_text" Target="_blank"></asp:HyperLink>
                                </div>
                                <script language="javascript" type="text/javascript">
                                    function ValidateTandCs(source, args) {
                                        args.IsValid = document.getElementById("CreateUserWizard1_CreateUserStepContainer_chkTandCs").checked;
                                    } 
                                </script>
                                <asp:CustomValidator ID="valTandCs" ClientValidationFunction="ValidateTandCs" runat="server"
                                    ErrorMessage="<%$ Resources:Resource, Register_valTandCsErrorMessage %>" ValidationGroup="CreateUserWizard1"> </asp:CustomValidator>

                                <asp:SqlDataSource ID="NationalitiesSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                                    SelectCommand="Nivdal_GetListOfActiveCountries" SelectCommandType="StoredProcedure">
                                </asp:SqlDataSource>
                                <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                                    SelectCommand="Nivdal_GetListOfLanguages" SelectCommandType="StoredProcedure">
                                </asp:SqlDataSource>
                                <asp:SqlDataSource ID="InsertExtraInfo" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                                    SelectCommand="Nivdal_AddMoreUserDetails" SelectCommandType="StoredProcedure"
                                    InsertCommand="Nivdal_AddMoreUserDetails" InsertCommandType="StoredProcedure">
                                    <InsertParameters>
                                        <%--<asp:ControlParameter Name="PublicName" Type="String" ControlID="PublicName" PropertyName="Text" />--%>
                                        <asp:ControlParameter Name="PublicName" Type="String" ControlID="UserName" PropertyName="Text" />
                                        <asp:ControlParameter Name="TeamName" Type="String" ControlID="TeamName" PropertyName="Text" />
                                        <%--<asp:ControlParameter Name="RealFirstName" Type="String" ControlID="FirstName" PropertyName="Text" />
                                        <asp:ControlParameter Name="RealLastName" Type="String" ControlID="LastName" PropertyName="Text" />--%>
                                        <asp:ControlParameter Name="Nationality" Type="String" ControlID="NationalityDropDownList"
                                            PropertyName="Text" />
                                        <asp:ControlParameter Name="PreferredLanguage" Type="String" ControlID="LanguageDropDownList"
                                            PropertyName="Text" />
                                    </InsertParameters>
                                </asp:SqlDataSource>
                            </ContentTemplate>
                            <CustomNavigationTemplate>
                                <div class="antifloater">
                                    <asp:Button ID="StepNextButton" runat="server" CommandName="MoveNext" Text="<%$ Resources:Resource, Register_SignUp %>"
                                        ValidationGroup="CreateUserWizard1" CssClass="bigredbutton" />
                                </div>
                                <div class="clearBoth"></div>
                            </CustomNavigationTemplate>
                        </asp:CreateUserWizardStep>
                        <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
                            <ContentTemplate>
                                <asp:Label ID="AccountCreatedLabel" runat="server" Text="<%$ Resources:Resource, Register_AccountCreatedLabel  %>"
                                    SkinID="GreenSmallHeaderLabel"></asp:Label>
                                                
                                <br /><br />
                                <asp:Button ID="ContinueButton" runat="server" CausesValidation="False" CommandName="Continue"
                                    Text="<%$ Resources:Resource, Register_ContinueButton %>" ValidationGroup="CreateUserWizard1"
                                    CssClass="GreenButtonTextStyle" />
                            </ContentTemplate>
                        </asp:CompleteWizardStep>
                    </WizardSteps>
                </asp:CreateUserWizard>
                <cc1:NoBot ID="RegNoBot" runat="server" ResponseMinimumDelaySeconds="2" CutoffWindowSeconds="60"
                    CutoffMaximumInstances="5" />
                    </div></div>
                </div>
                </asp:Panel>
                </td>
                </tr>
                </table>
                <asp:Panel ID="ErrorLabelPanel" runat="server">
                    <asp:Label ID="ErrorLabel" runat="server" SkinID="GreenSmallHeaderLabel"></asp:Label>
                </asp:Panel>
            </div>    
            </div>
            <div class="clearBoth"></div>
            </div>
            
        </div>
        <div class="clearBoth"></div>
     
    <div class="footer">
    <div class="auto_margin site_width">
        <div class="tbl"><div class="tblr"><div class="tblc footercell">
        <asp:HyperLink ID="PrivacyPolicyHyperLink" runat="server" Text="<%$ Resources:Resource, Global_PrivacyPolicy %>"
            NavigateUrl="~/Privacy.aspx" Target="_blank"></asp:HyperLink>
        &nbsp;&nbsp;
        <asp:HyperLink ID="TermsHyperLink" runat="server" Text="<%$ Resources:Resource, Global_TermOfUse %>"
            NavigateUrl="~/Terms.aspx" Target="_blank"></asp:HyperLink>
        &nbsp;&nbsp;
        <asp:HyperLink ID="ContactHyperlink" runat="server" Text="<%$ Resources:Resource, Global_Contact %>"
            NavigateUrl="~/Contact.aspx"></asp:HyperLink>
        <%--&nbsp;&nbsp;
        <asp:HyperLink ID="AdvertiseHyperlink" runat="server"  NavigateUrl="~/Sponsors/Default.aspx"
                Text="<%$ Resources:Resource, BigMasterPage_AdvertiseHyperlink %>" ></asp:HyperLink>
        &nbsp;&nbsp;--%>
        <asp:HyperLink ID="EnterAsGuestLink" runat="server" NavigateUrl="~/Countries.aspx"
            Text="<%$ Resources:Resource, Default_EnterAsGuest %>"></asp:HyperLink>   
        <br />
        <asp:Label ID="Label2" runat="server" Text="<%$ Resources:Resource, BigMasterPage_copyrightLabel%>"></asp:Label>

        <asp:Image ID="GeneralStadiumImage" runat="server" Width="1" Height="1" ImageUrl="~/Images/pic2.jpg" AlternateText="GeneralStadiumImage" />
        </div></div></div>
    </div>
    </div>

        
                                
                                
                            
    </asp:Panel>
    </div>
    </form>
    <script type="text/javascript">
    /* <![CDATA[ */
    var google_conversion_id = 982634092;
    var google_conversion_language = "en";
    var google_conversion_format = "3";
    var google_conversion_color = "ffffff";
    var google_conversion_label = "LpfXCNz52wIQ7JzH1AM";
    var google_conversion_value = 0;
    /* ]]> */
    </script>
    <script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
    </script>
    <noscript>
    <div style="display:inline;">
    <img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/982634092/?label=LpfXCNz52wIQ7JzH1AM&amp;guid=ON&amp;script=0"/>
    </div>
    </noscript>
        <script type="text/javascript">


        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-7321654-12']);
        _gaq.push(['_trackPageview']);

        (function () {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();

    </script>
</body>
</html>
